<template>
  <view class="publish-btn" @click="handleClick">
    <image
      class="publish-icon"
      src="@/static/houseSublease/fatie.png"
      mode="aspectFit"></image>
  </view>
</template>

<script>
export default {
  name: "publish-btn",
  props: {
    type: {
      type: String,
      default: "house", // house, notice, shop
    },
  },
  data() {
    return {
      publish_btn: this.$Config.HTTP_REQUEST_URL + "/img/publish.png",
    };
  },
  methods: {
    handleClick() {
      const urls = {
        house: "/pages/publish/publish-house",
        notice: "/pages/publish/publish-notice",
        shop: "/pages/publish/publish-shop",
      };
      uni.navigateTo({
        url: urls[this.type],
      });
    },
  },
};
</script>

<style lang="less" scoped>
.publish-btn {
  position: fixed;
  right: 8rpx;
  bottom: 308rpx;
  width: 112rpx;
  height: 112rpx;
  z-index: 100;

  .publish-icon {
    width: 100%;
    height: 100%;
  }
}
</style>
